Piano notes book, powered by Astro and React.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
429 B

  1. ---
  2. import { getCollection } from 'astro:content';
  3. import Default from '../content/layouts/Default.astro';
  4. export const getStaticPaths = async () => {
  5. const entries = await getCollection('special');
  6. return entries.map(entry => ({
  7. params: { slug: entry.slug }, props: { entry },
  8. }));
  9. }
  10. const { entry } = Astro.props;
  11. const { Content } = await entry.render();
  12. ---
  13. <Default title={entry.data.title}>
  14. <Content />
  15. </Default>